From: Eli Zaretskii Date: Sat, 29 Mar 2025 10:36:02 +0000 (+0300) Subject: Avoid warning when loading 'go-ts-mode' X-Git-Tag: archive/raspbian/1%30.2+1-2+rpi1^2~2^2~24^2~172 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=26873d5028ed8aa0e2fc56c7d6ed3b43ff976d3c;p=emacs.git Avoid warning when loading 'go-ts-mode' * lisp/progmodes/go-ts-mode.el (treesit-ready-p): Silence the warning if the gomod language library is not installed. (Bug#77213) --- diff --git a/lisp/progmodes/go-ts-mode.el b/lisp/progmodes/go-ts-mode.el index eb5b93008eb..c233a7222fc 100644 --- a/lisp/progmodes/go-ts-mode.el +++ b/lisp/progmodes/go-ts-mode.el @@ -476,7 +476,7 @@ what the parent of the node would be if it were a node." (derived-mode-add-parents 'go-mod-ts-mode '(go-mod-mode)) -(if (treesit-ready-p 'gomod) +(if (treesit-ready-p 'gomod t) (add-to-list 'auto-mode-alist '("/go\\.mod\\'" . go-mod-ts-mode))) (provide 'go-ts-mode)